/* Ejercicio 3.35
   ejer3_35.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int n, inverted, a;

    printf( "Enter a number: " );
    scanf( "%d", &n );

    a = n;
    inverted = 0;
    while ( a != 0 ) {
        inverted = 10 * inverted + a % 10;
        a /= 10;
    }

    if ( inverted == n ) {
        printf( "The number is a palindrome\n" );
    }
    else {
        printf( "The number isn't a palindrome\n" );
    }
	return 0;
} /* fin de la funcion main */
